package actions;

import mapControl.GraphicsMapControl;

import com.jme.input.action.InputAction;
import com.jme.input.action.InputActionEvent;

import elementos.Bomba;
import elementos.Player;



public class PlatarBomba extends InputAction {


	private Player player;
	private GraphicsMapControl mapControl; 
	
	
	public PlatarBomba(Player player, GraphicsMapControl mapControl) {
		this.player = player;
		this.mapControl = mapControl;
		
	}

	@Override
	public void performAction(InputActionEvent evt) {

		if (mapControl.getContadorBombas().hayBombas()) {

			
			player.getBodyController().fadeTo("plantar", 0, true);

			
			new Thread(new Bomba(player,mapControl)).start();
			

		}
	}

}
